<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>



<c:url var="commURL" value="/comm">
	<c:param name="contactId">${comm.parentContactId}</c:param>
</c:url>
<a href="${commURL}" class="button-link ui-corner-all ui-state-default" >Back</a>

<h2>communique</h2>
<form:form method="post" modelAttribute="comm">
	<s:bind path="*">
		<c:if test="${status.error}">
			<div id="errormessage" class="error">Form has errors</div>
		</c:if>
	</s:bind>
	<form:hidden path="parentContactId"/>
	<form:hidden path="id"/>
	
	<div class="basic-field-wrapper">
		<form:label path="message">Message</form:label>&nbsp;<form:errors path="message" cssClass="error" /><br/>
		<form:textarea path="message" cols="50" rows="10" />
		<br/><br/>
		<form:label path="created" cssClass="basic-field-labbel">Date Time</form:label>
		<form:input path="created" cssClass="basic-text-field" cssStyle="width:160px;" />
		<br/><br/>
		<form:label path="ranking">Rating</form:label>
		<form:select path="ranking">
			<form:option value="1" label="No Way" />
			<form:option value="2" label="Meh" />
			<form:option  value="3" selected="selected" label="Average" />
			<form:option value="4" label="Good" />
			<form:option value="5" label="Great" />
		</form:select>
		<br/><br/>
		<form:label path="commTypeId">Type</form:label>
		<form:select path="commTypeId">
			<form:option value="1" label="Phone Interview" />
			<form:option value="2" label="In-Person Interview" />
			<form:option value="3" label="Call" />
			<form:option value="4" label="In-Person" />
			<form:option value="5" selected="selected" label="Email" />
		</form:select>
		<br/><br/>
		<c:url var="indexURL" value="/index" />
		<button type="button" onClick="location.href='${commURL}'">Cancel</button>&nbsp;&nbsp;&nbsp;<button type="submit">Submit</button>	
	</div>
</form:form>

<br/>


<script>

$(function() {
	$( "#created" ).datetimepicker({ampm: true, dateFormat: 'M d, yy' });
	$("button").button();
});
</script>


